import request from '@/utils/request'

/**
 * id
 * 获取车次详情
 */
export function getTransportLineTrips(id) {
  return request({
    url: `/manager/transportLine/trips/${id}`
  })
}

/**
 * put
 * 更新车次
 */
export function updateLine(data) {
  return request({
    url: `/manager/transportLine/trips/${data.id}`,
    method: 'put',
    data
  })
}

/**
 * 删除车次 delete
 */
export function deleteLine(id) {
  return request({
    url: `/manager/transportLine/${id}`,
    method: 'delete'
  })
}

/**
 * 新增线路
 */
export function addTransportLine(data) {
  return request({
    url: '/manager/transportLine',
    method: 'post',
    data
  })
}

/**
 * 获取线路详情
 */
export function getOneLine(id) {
  return request({
    url: `/manager/transportLine/${id}`
  })
}
